﻿/**
 * ...
 * update
 * @author js, alex
 */
package db;
import php.db.Object;

class Item extends Object {
	static var TABLE_NAME = "items";
	static var PRIVATE_FIELDS = ["category"];
	
	public var id: Int;
	public var name: String;
	public var link: String;
	public var description: String;
	public var date: Date;
	public var author: String;
	public var id_ch: Int;
	public var category: Array<String>;
	
	public static var manager = new ItemManager(Item);
	
	public function new(name: String, link: String, date: Date, id_ch: Int, ?description: String, ?author: String, ?category:Array<String>) {
		super();
		this.name = name;
		this.link = link ;
		this.date = date ;
		this.description = description ;
		this.author = author ;
		this.id_ch = id_ch ;
		this.category = category;
	}
}